{extend name="base"/}
 {block name="content"}
<div id="dcWrap">
 {include file="public:header" /}

<!-- dcHead 结束 --> 
{include file="public:nav" /}
 <div id="dcMain">
   <!-- 当前位置 -->
<div id="urHere">DouPHP 管理中心<b>></b><strong>网站管理员</strong> </div>   <div id="manager" class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
    <h3><a href="{:url('admin/manage/manage_add')}" class="actionBtn">添加管理员</a>网站管理员</h3>
        <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
     <tr>
      <th width="30" align="center">编号</th>
      <th align="left">管理员名称</th>
      <th align="left">所属用户组</th>
      <th align="center">E-mail地址</th>
	  <th align="center">手机号</th>
	  <th align="center">是否启用</th>
      <th align="center">添加时间</th>
      <th align="center">最后登录时间</th>
      <th align="center">操作</th>
     </tr>
	  {foreach name="data" item="vo"}
      <tr>
		  <td align="center">{$vo['admin_id']}</td>
		  <td>{$vo['admin_username']}</td>
		  <td>{$vo['title']}</td>
		  <td align="center">{$vo['email']}</td>
		  <td align="center"> {$vo['phone']}</td>
		   <td align="center"> {$vo['states']?'启用':'未启用'}</td>
		  <td align="center">{$vo['createtime']|date="Y-m-d H:i",###}
		  </td>
		  <td align="center">
			{if condition="$vo['lastlogin']==0"}
				还未登陆过
			{else /}	
				{$vo['lastlogin']|date="Y-m-d H:i",###}
			{/if}
		  </td>		
		  <td align="center"><a onclick="dele_user('确定要{$vo['states']?'禁用':'启用'}管理员？',{$vo['admin_id']})">{$vo['states']?'禁用':'启用'}</a> |<a href="{:url('admin/manage/manage_edit',['admin_id'=>$vo['admin_id']])}">编辑</a> | <a href="JavaScript:" onclick="admin_user('确定要删除管理员？',{$vo['admin_id']})">删除</a></td>
     </tr>
	 {/foreach}
	 </tr>
         </table>
                       </div>
 </div>
 <div class="clear"></div>
<script type="text/javascript">

  // 确认弹出层
    function dele_user(message, id) {
        layer.open({
            content : message,
			
            icon:3,
            btn : ['是','否'],
            yes : function(){
                var url="{:url('admin/manage/manage_dele')}";
				var success_url="{:url('admin/manage/manage_list')}";
				$.post(url,{'admin_id':id},function(result){
				if(result.status=='1')
					{
					dialog.success(result.message,success_url);
					}else
					{
						dialog.error(result.message);
					} 
				})
            }
        });
    }
//删除用户	
	function admin_user(message, id) {
        layer.open({
            content : message,
			
            icon:3,
            btn : ['是','否'],
            yes : function(){
                var url="{:url('admin/manage/manage_admin')}";
				var success_url="{:url('admin/manage/manage_list')}";
				$.post(url,{'admin_id':id},function(result){
				if(result.status=='1')
					{
					dialog.success(result.message,success_url);
					}else
					{
						dialog.error(result.message);
					} 
				})
            }
        });
    }
</script>

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 {/block}